/*
 * This file is part of Cadmium.
 * Copyright (C) 2007-2010 Xavier Clerc.
 *
 * Cadmium is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * Cadmium is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package fr.x9c.cadmium.support;

import fr.x9c.cadmium.util.Signal;

/**
 * This class implements a <tt>main</tt> method that prints (on standard
 * output) for each signal a line indicating whether the signal is supported
 * or not.
 *
 * @author <a href="mailto:cadmium@x9c.fr">Xavier Clerc</a>
 * @version 1.0
 * @since 1.0
 */
public final class TestSignals {

    /**
     * No instance of this class.
     */
    private TestSignals() {
    } // end empty constructor

    /**
     * For each signal, prints a line indicating whether the signal is
     * supported or not.
     * @param args ignored
     */
    public static void main(final String[] args) {
        for (Signal.Kind kind : Signal.Kind.values()) {
            System.out.printf("signal '%s' is %s\n",
                              kind.name(),
                              (new Signal(kind)).isValid()
                              ? "supported"
                              : "unsupported");
        } // end for
    } // end method 'main(String[])'

} // end class 'TestSignals'
